home *** CD-ROM | disk | FTP | other *** search
- function onEnterFrame()
- {
- var _loc2_ = this;
- switch(_loc2_.runSta)
- {
- case "leaves":
- _loc2_.genLeavesStep();
- break;
- case "rest":
- _loc2_.restStep();
- }
- }
- function genLeavesStep()
- {
- var _loc2_ = this;
- if(BouncerIndex < MaxBouncer)
- {
- BouncerIndex++;
- if(BouncerIndex % 2 == 0)
- {
- _loc2_.attachMovie("Bouncer","Bouncer" + BouncerIndex,BouncerIndex);
- _loc2_["Bouncer" + BouncerIndex].aniCtt.gotoAndStop(leafType);
- _loc2_["Bouncer" + BouncerIndex]._y = -20;
- }
- }
- if(_loc2_.timeCnt < _loc2_.leavesMax)
- {
- _loc2_.timeCnt = _loc2_.timeCnt + 1;
- }
- else
- {
- _loc2_.removeLeaves();
- _loc2_.timeCnt = 0;
- _loc2_.BouncerIndex = 0;
- _loc2_.runSta = "rest";
- }
- }
- function restStep()
- {
- var _loc2_ = this;
- if(_loc2_.timeCnt < _loc2_.restMax)
- {
- _loc2_.timeCnt = _loc2_.timeCnt + 1;
- }
- else
- {
- _loc2_.timeCnt = 0;
- _loc2_.runSta = "leaves";
- }
- }
- function removeLeaves()
- {
- var _loc3_ = this;
- var _loc2_ = 0;
- while(_loc2_ <= _loc3_.MaxBouncer)
- {
- _loc3_["Bouncer" + _loc2_].removeMovieClip();
- _loc2_ = _loc2_ + 1;
- }
- }
- MaxBouncer = 12;
- BouncerIndex = 0;
- timeCnt = 0;
- runSta = "leaves";
- leavesMax = 180;
- restMax = 240;
- leafType = "dry";
-